package UDP;

import java.io.IOException;
import java.net.*;

public class Send {
    public static void main(String[] args) throws IOException {
        System.out.println("客服端启动");
        System.out.println("Sending message to localhost:8080");
        DatagramSocket ds=new DatagramSocket();
        byte[] bytes="Hello World".getBytes();

        DatagramPacket dp=new DatagramPacket(bytes,bytes.length, InetAddress.getLocalHost(),8080);
        ds.send(dp);
        ds.close();
    }
}
